
#ifndef HINGERESTRAINTWIDGET_H
#define HINGERESTRAINTWIDGET_H

#include <BButton>
#include <BComboBox>
#include <BRealSpinBox>
#include <BCheckBox>
#include <BLineEdit>

#include <BHingeRestraint>

class HingeRestraintPanel : public BWidget
{
	BOBJECT(HingeRestraintPanel);
public:
	HingeRestraintPanel(BWidget* parent = 0);
	~HingeRestraintPanel();

protected:
	void slotAssetChanged(BObject* object, const BValue& value);

	void slotNameAEditFinished(BObject* object, const BValue& value);
	void slotPivotAEditFinished(BObject* object, const BValue& value);
	void slotAxisAEditFinished(BObject* object, const BValue& value);
	void slotNameBEditFinished(BObject* object, const BValue& value);
	void slotPivotBEditFinished(BObject* object, const BValue& value);
	void slotAxisBEditFinished(BObject* object, const BValue& value);

	void slotLimitMinimumEditFinished(BObject* object, const BValue& value);
	void slotLimitMaximumEditFinished(BObject* object, const BValue& value);
	void slotMotorEnabledToggled(BObject* object, const BValue& value);
	void slotMotorTargetEditFinished(BObject* object, const BValue& value);
	void slotMotorVelocityEditFinished(BObject* object, const BValue& value);
	void slotMotorMaxForceEditFinished(BObject* object, const BValue& value);

private:
	BHingeRestraint*		_hingeRestraint;

	BLineEdit*				_nameAEdit;
	BLineEdit*				_pivotAEdit;
	BLineEdit*				_axisAEdit;
	BLineEdit*				_nameBEdit;
	BLineEdit*				_pivotBEdit;
	BLineEdit*				_axisBEdit;

	BRealSpinBox*			_minimumSpinBox;
	BRealSpinBox*			_maximumSpinBox;
	BGroupBox*				_motorGroupBox;
	BRealSpinBox*			_motorTargetSpinBox;
	BRealSpinBox*			_motorVelocitySpinBox;
	BRealSpinBox*			_motorMaxForceSpinBox;

};

#endif
